#ifndef ASTNODE_PRINT_STATEMENT_H
#define ASTNODE_PRINT_STATEMENT_H
#include "AstNode.h"

class AstNodePrint : public AstNode
{
  // pure virtual!! needed??
};


class AstNodeLiteral;

class AstNodePrintLiteral : public AstNodePrint
{
  public:
    AstNodePrintLiteral(AstNodeLiteral * son,bool endLine=true);

    virtual void dump(int level);
    virtual void compile(class CompileVisitor*);

    inline  AstNodeLiteral * getLiteral() { return literal; };
    inline  bool  getEndLine() { return endLine; };

    //virtual int  compile(ClassFile * klass, MethodInfo * method);

  private:
    AstNodeLiteral * literal;
    bool             endLine;
};

class AstNodePrintExpression : public AstNodePrint
{
  public:
    AstNodePrintExpression(AstNodeExpression * son,bool endLine=true);

    virtual void dump(int level);
    virtual void  compile(class CompileVisitor*);

    inline  AstNodeExpression * getExpression() { return expr; };
    inline  bool                getEndLine() { return endLine; };

    //virtual int  compile(ClassFile * klass, MethodInfo * method);
  private:
    AstNodeExpression * expr;
    bool                endLine;
};

#endif
